﻿using System.Text.Json.Serialization;

namespace HPSocketLibrary
{

    /// <summary>
    /// 设备信息
    /// </summary>
    public class DeviceInfoView
    {
        /// <summary>
        /// socket clientID
        /// </summary>
        [JsonConverter(typeof(IntPtrConverterUsingIntParse))]
        public IntPtr ConnId { get; set; }

        /// <summary>
        /// IP
        /// </summary>
        public string Ip { get; set; }

        /// <summary>
        /// Port
        /// </summary>
        public ushort Port { get; set; }

        /// <summary>
        /// 厂商名称
        /// </summary>
        public string? Make { get; set; }

        /// <summary>
        /// model信息
        /// </summary>
        public string? Model { get; set; }

        /// <summary>
        /// 设备ID（填写和serialNo一致）
        /// </summary>
        public string[]? Racks { get; set; }

        /// <summary>
        /// 设备序列号，唯一标识该设备
        /// </summary>
        public string? SerialNo { get; set; }

        /// <summary>
        /// 设备的状态 2上线 6下线
        /// </summary>
        public string Status { get; set; } = "0";

        /// <summary>
        /// 状态变化时间
        /// </summary>
        public DateTime? Time { get; set; }
    }
}